#include <iostream>
#include <vector>
using namespace std;


void por(vector<int>& nums,int k,vector<vector<int>> &res)
{
	if(k == nums.size()){
		res.push_back(nums);
		return;
	}
	for(int i=k;i<nums.size();++i){
		swap(nums[k],nums[i]);
		por(nums,k+1,res);
		swap(nums[k],nums[i]);
	}
}

vector<vector<int>> permute(vector<int>& nums){
	if(nums.size() == 0){
		return {};
	}
	vector<vector<int>> res;
	por(nums,0,res);
	return res;
}


int main(int argc, char *argv[])
{
	
	return 0;
}


